package com.taotao.rest.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.converter.json.MappingJacksonValue;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.rest.service.ItemCatService;


@Controller
public class ItemCatController {
	@Autowired
	private ItemCatService itemCatService;
	
	@RequestMapping("/itemCat/all")
	@ResponseBody
	public MappingJacksonValue getItemCatList(String callback) {
		@SuppressWarnings("rawtypes")
		Map map = itemCatService.getItemCatList();
		MappingJacksonValue jack = new MappingJacksonValue(map);
		jack.setJsonpFunction(callback);
		return jack;
		
	}
}
